In [9]:
import geopandas as gpd
%matplotlib inline
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
In [11]:
dc_boundary = gpd.read_file('../data/dc-boundary.geojson')
dc_boundary.plot()
Out[11]:
In [14]:
dc_quadrants = gpd.read_file('../data/dc-quadrants.geojson')
dc_quadrants.plot()
Out[14]:
In [18]:
last_30_days = gpd.read_file('../data/parking-enforcement-last-30-days.geojson')
last_30_days.plot()
Out[18]:
In [20]:
violations_with_quadrants = gpd.sjoin(last_30_days, dc_quadrants, how="inner", op='intersects')
In [22]:
violations_with_quadrants.head()
Out[22]:
In [25]:
In [26]:
base = dc_quadrants.plot(color='white')
last_30_days.plot(ax=base, marker='o', color='red', markersize=5)
Out[26]:
In [ ]: